# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AndroidManagement.V1.Model.AdvancedSecurityOverrides do
  @moduledoc """
  Advanced security settings. In most cases, setting these is not needed.

  ## Attributes

  *   `commonCriteriaMode` (*type:* `String.t`, *default:* `nil`) - Controls Common Criteria Mode—security standards defined in the Common Criteria for Information Technology Security Evaluation (https://www.commoncriteriaportal.org/) (CC). Enabling Common Criteria Mode increases certain security components on a device, see CommonCriteriaMode for details.Warning: Common Criteria Mode enforces a strict security model typically only required for IT products used in national security systems and other highly sensitive organizations. Standard device use may be affected. Only enabled if required. If Common Criteria Mode is turned off after being enabled previously, all user-configured Wi-Fi networks may be lost and any enterprise-configured Wi-Fi networks that require user input may need to be reconfigured.
  *   `contentProtectionPolicy` (*type:* `String.t`, *default:* `nil`) - Optional. Controls whether content protection, which scans for deceptive apps, is enabled. This is supported on Android 15 and above.
  *   `developerSettings` (*type:* `String.t`, *default:* `nil`) - Controls access to developer settings: developer options and safe boot. Replaces safeBootDisabled (deprecated) and debuggingFeaturesAllowed (deprecated).
  *   `googlePlayProtectVerifyApps` (*type:* `String.t`, *default:* `nil`) - Whether Google Play Protect verification (https://support.google.com/accounts/answer/2812853) is enforced. Replaces ensureVerifyAppsEnabled (deprecated).
  *   `mtePolicy` (*type:* `String.t`, *default:* `nil`) - Optional. Controls Memory Tagging Extension (MTE) (https://source.android.com/docs/security/test/memory-safety/arm-mte) on the device. The device needs to be rebooted to apply changes to the MTE policy.
  *   `personalAppsThatCanReadWorkNotifications` (*type:* `list(String.t)`, *default:* `nil`) - Personal apps that can read work profile notifications using a NotificationListenerService (https://developer.android.com/reference/android/service/notification/NotificationListenerService). By default, no personal apps (aside from system apps) can read work notifications. Each value in the list must be a package name.
  *   `untrustedAppsPolicy` (*type:* `String.t`, *default:* `nil`) - The policy for untrusted apps (apps from unknown sources) enforced on the device. Replaces install_unknown_sources_allowed (deprecated).
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :commonCriteriaMode => String.t() | nil,
          :contentProtectionPolicy => String.t() | nil,
          :developerSettings => String.t() | nil,
          :googlePlayProtectVerifyApps => String.t() | nil,
          :mtePolicy => String.t() | nil,
          :personalAppsThatCanReadWorkNotifications => list(String.t()) | nil,
          :untrustedAppsPolicy => String.t() | nil
        }

  field(:commonCriteriaMode)
  field(:contentProtectionPolicy)
  field(:developerSettings)
  field(:googlePlayProtectVerifyApps)
  field(:mtePolicy)
  field(:personalAppsThatCanReadWorkNotifications, type: :list)
  field(:untrustedAppsPolicy)
end

defimpl Poison.Decoder, for: GoogleApi.AndroidManagement.V1.Model.AdvancedSecurityOverrides do
  def decode(value, options) do
    GoogleApi.AndroidManagement.V1.Model.AdvancedSecurityOverrides.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AndroidManagement.V1.Model.AdvancedSecurityOverrides do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
